<script type="text/javascript" language="javascript" src="{$smarty.const.THEME_RELATIVE}lytebox.js"></script>
<div class="listingmodule default">
		{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
		{if $permissions.administrate == 1}
			<a href="{link action=userperms _common=1}"><img src="{$smarty.const.ICON_RELATIVE}userperms.png" title="{$_TR.alt_userperm}" alt="{$_TR.alt_userperm}" /></a>
			<a href="{link action=groupperms _common=1}"><img src="{$smarty.const.ICON_RELATIVE}groupperms.png" title="{$_TR.alt_groupperm}" alt="{$_TR.alt_groupperm}" /></a>
		{/if}
		{if $permissions.configure == 1}
		        	<a href="{link action=configure _common=1}"><img src="{$smarty.const.ICON_RELATIVE}configure.png" title="{$_TR.alt_configure}" alt="{$_TR.alt_configure}" /></a>
		{/if}
		{if $permissions.configure == 1 or $permissions.administrate == 1}
			<br />
		{/if}
		{/permissions}

<img src='{$smarty.const.THEME_RELATIVE}images/composer_{$smarty.const.LANG}.png' border=0>
	{foreach name=a from=$listings item=listing}
	<div class="item">
		{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
		<div class="itemactions">
			{if $permissions.configure == 1 or $permissions.administrate == 1}

			{if $smarty.foreach.a.first == 0}
			<a href="{link action=rank_switch a=$listing->rank b=$prev id=$listing->id}">			
				<img src="{$smarty.const.ICON_RELATIVE}up.png" title="{$_TR.alt_previous}" alt="{$_TR.alt_previous}" />
			</a>
			{/if}

			<a href="{link action=edit_listing id=$listing->id}" title="Edit this entry">
				<img src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" />
			</a>
			<a href="{link action=delete_listing id=$listing->id}" title="Delete this entry">
				<img src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" />
			</a>


			{if $smarty.foreach.a.last == 0}
			<a href="{link action=rank_switch a=$next b=$listing->rank id=$listing->id}">
				<img src="{$smarty.const.ICON_RELATIVE}down.png" title="{$_TR.alt_next}" alt="{$_TR.alt_next}" />
			</a>
			{/if}
			{/if}
		</div>
		{/permissions}
		<div class="text">
		{* link action=view_listing id=$listing->id *}
		<table border=0>
		<tr><td valign=top>
				<a {if $listing->picpath != ""} href='{$listing->picpath}' rel="lytebox" {/if} >
					<img class="listingimage cont11" src={if $listing->picpath != ""} "{$smarty.const.URL_FULL}phpThumb.php?w=100&h=120&src={$listing->picpath}" {else} "{$smarty.const.THEME_RELATIVE}../common/images/icons/not_available.jpeg" {/if}border=0 />
				</a>
		</td>
		<td>
		<h2><a href="{link action=music_by_composer module=musicsmodule id=$listing->id src=$__loc->src}">{$listing->name}</a></h2>
		        	<div class="bodycopy" >	{$listing->body}</div>
					{if count($listing->musics) > 0 }
					<div style="font-size: 12px; font-weight: bold; color: #4F5159; padding-top: 10px;">Các bài hát thuộc tác giả</div>
					{assign var=musics value=$listing->musics}
						{include file=`$smarty.const.BASE`modules/musicsmodule/views/_list_music.tpl}
					
					</div>
					{/if}
		</td></tr></table>	
		</div>
		
		<div style="clear:both"></div>
	</div>
{foreachelse}
	<div><i>No composers found.</i></div>
{/foreach}	

<!-- page split for tacgia module -->
{if $page_count > 1 }
<div align=center style="padding-top: 30px;">
<font style="font-weight: bold; font-size: 12px; color: ">Trang&nbsp;&nbsp;</font>
{foreach from=$pages item=page key=page_key}
{if $page_key == $cur_page}
{$page}&nbsp;
{else}
<a href="{link action=view_page page=$page_key}">{$page}</a>&nbsp;
{/if}
{/foreach}
</div>
{/if}

{if $permissions.administrate == 1}
<div class="moduleactions">
    <a href="{link action=edit_listing}">New composer</a>
</div>
{/if}

</div>
